package com.xbts.common.enums;

/**
 * @Author llk
 * @Date 2023/8/25 15:34
 */
public enum ServerStatusEnum {

    ACTIVE("运行中"),
    SHUTOFF("已停止"),
    REBOOT("重启中"),
    DELETED( "已删除"),
    EXPIRED("已到期"),
    ;

    private String description;

    ServerStatusEnum(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    public static ServerStatusEnum getByName(String name) {
        for (ServerStatusEnum serverStatusEnum : ServerStatusEnum.values()) {
            if (serverStatusEnum.name().equals(name)) {
                return serverStatusEnum;
            }
        }
        return null;
    }
}
